# ! test
import requests
import re
import json

url = "https://www.xiami.com/song/collects/ids/1774175356,1774175357,1774175358,1774175359,1774175360,1774175361,1774175362,1774175363,1774175364,1774175365,1774175366,1774175367?_xiamitoken=1890466bac39394c445340e4c4c743f9"
headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
                  "(KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36",
    'Referer': 'https://www.xiami.com/album/g8rX6f810?spm=0.0.0.0.0u2Djz',
}
cookies = {
    'member_auth':'gj2eTo5Nv29lhPCQG4A2dyMW5eTTSGKExtlW3uYp5VEjd9oBN9bxx6uSRQtB2SOSrl0mdvjDhHgb',
    '_xiamitoken':'1890466bac39394c445340e4c4c743f9',
}

data = {'_xiamitoken':'1890466bac39394c445340e4c4c743f9','ids':'1774175364,1774175358','list_id':'402408751','submit':'确+定'}

resp = requests.post(url='https://www.xiami.com/song/collects',data=data, headers = headers,cookies=cookies)

res = r'<div class="alert alert_ok"> <strong>([\u4e00-\u9fa5]*?)</strong>'
print(re.findall(res,resp.text,re.S|re.M))